class Solution {
    public int[][] findContinuousSequence(int target) {
        List<int[]> res = new ArrayList<>();
        //i为窗口左边,j为窗口右边 sum为i-j这个窗口内部的和
        int i = 1,j = 2,sum = 3;
        //最小就是窗口中只有两位数
        while(i<j) { 
            if(target == sum) {
                int[] arr = new int[j-i+1];
                for(int k = i;k<=j;k++) {
                    arr[k-i] = k;
                }
                res.add(arr);
            }
            if(target <= sum) {
                sum-=i;
                i++;
            }else {
                j++;
                sum+=j;
            }
        }
        return res.toArray(new int[0][]);
    }
}